Skip to main content
ICT
Lesson A6 - Libraries and APIs
 
Main Previous Next
Title Page >  
Summary >  
Lesson A1 >  
Lesson A2 >  
Lesson A3 >  
Lesson A4 >  
Lesson A5 >  
Lesson A6 >  
Lesson A7 >  
Lesson A8 >  
Lesson A9 >  
Lesson A10 >  
Lesson A11 >  
Lesson A12 >  
Lesson A13 >  
Lesson A14 >  
Lesson A15 >  
Lesson A16 >  
Lesson A17 >  
Lesson A18 >  
Lesson A19 >  
Lesson A20 >  
Lesson A21 >  
Lesson A22 >  
Lesson AB23 >  
Lesson AB24 >  
Lesson AB25 >  
Lesson AB26 >  
Lesson AB27 >  
Lesson AB28 >  
Lesson AB29 >  
Lesson AB30 >  
Lesson AB31 >  
Lesson AB32 >  
Lesson AB33 >  
Vocabulary >  
 

LAB ASSIGNMENT A6.1 page 11 of 12

Taxes

Background:

There are many absolutes in life, one of which is taxes. In this lesson we study the tax deductions required to print a payroll check. The first tier of the federal income tax rate is 15% (as of 1996) and FICA is an abbreviation for Social Security Tax. The latest calculations show that the average American worker toils for the government for about 5 out of the 12 months of the year.

Assignment:

  1. Write a program that calculates, stores, and prints tax info about one person. The constructor will take the hours worked and the hourly rate paid. You are not required to line up the decimal points in your output. Note: “Gross Pay” means income before tax is deducted, and “Net Pay” means income after tax is deducted. Here is an example output:

    Hours worked: 30.0
    Hourly rate: 12.35

    Gross pay: 370.5

    Federal Tax (15.4%): 57.057
    FICA Tax (7.75%): 28.71375
    State Tax (4.0%): 14.82

    Net pay: 269.90925

    Your program may give a slightly different net pay answer due to rounding off issues. Do not worry about this difference.

  2. Use final values to store the tax rates in your program.

 

Main Previous Next
Contact
 © ICT 2006, All Rights Reserved.